#!user/bin/env python3
# -- coding: utf-8 --
# @Createtime：2022/5/16
# @Updatetime：
# @Author：Test008
# @File：ShowStuInfo.py
# @Description：显示全部学生信息模块
from SearchStuInfo import show_student
from config import filename
import os


def show():
    student_lst = []
    if os.path.exists(filename):
        with open(filename, 'r', encoding='utf-8') as rfile:
            info_list = rfile.readlines()
            if len(info_list) != 0:
                for i in info_list:
                    student_lst.append(eval(i))
                if student_lst:
                    show_student(student_lst)
            else:
                print('还未录入学生信息')
    else:
        print('暂未保存过数据...')



if __name__ == '__main__':
    show()
